Hi, I need to access a textbox's text in the click event of a button. I can't figure out what to do. Here is my code...
void fnPrint(DB dialog)
{
//Print what is in the textbox
}
DB dbDialog = create "Input"
DBE txtBox = text(dbDialog, "Input: ", "", 100, false)
DBE button(dbDialog, "Submit", fnPrint)
realize dbDialog
show dbDialog
joeyvitoro - Wed Mar 07 13:41:13 EST 2012 |
Re: Access textbox on button click event
[1] You gotta declare many of the DBEs as global parameters, so you might as well routinely define all of them up front.
DB dbDialog
DBE txtBox, dbeSubmit
void fnPrint(DBE dbeXX)
{ string Text = get(txtBox)
infoBox("Input parameter is dbeSubmit = " (dbeXX == dbeSubmit) "\n" Text)
}
dbDialog = create "Input"
txtBox = text(dbDialog, "Input: ", "", 100, false)
dbeSubmit = button(dbDialog, "Submit", fnPrint)
realize dbDialog
show dbDialog
|
Re: Access textbox on button click event |